﻿namespace Utils
{
    #region usings

    using System.Collections.Generic;

    #endregion

    public static class FrameworkExtensions
    {
        #region Public Methods

        public static void SafeClear<T>(this List<T> source, object syncObj)
        {
            if (source != null)
            {
                lock (syncObj)
                {
                    if (source != null)
                    {
                        source.Clear();
                        source = null;
                    }
                }
            }
        }

        #endregion
    }
}